﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace  RzCorportativo.Recursos.uc
{
    public partial class EditorHtml : System.Web.UI.UserControl
    {
        public int EditorHeight { get; set; }
        public int EditorWidth { get; set; }
        public string HtmlString { get { return this.editor.Text; } set { this.editor.Text = value; } }
        public bool Enabled { get { return this.editor.Enabled; } set { this.editor.Enabled = value; } }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.editor.FilebrowserImageUploadUrl = base.ResolveUrl(EFramework.Web.Configuration.WebConfig.GetSection("urlUpload"));
            if (this.IsPostBack)
                return;
            if (this.EditorHeight != 0)
                this.editor.Height = this.EditorHeight;
            if (this.EditorWidth != 0)
                this.editor.Width = this.EditorWidth;
        }
    }
}